package com.blog.effective.note9;

/**
 * 〈一个简单的电话号码类〉<br>
 *
 * @author 未绪
 * @time 2018/1/2 15:50
 */
public class PhoneNumber {

    private static String phoneNumber;       //电话号码
    private static String numAddr;          //电话号码的归属地

    public PhoneNumber(String phoneNumber,String numAddr){
        this.phoneNumber=phoneNumber;
        this.numAddr=numAddr;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof PhoneNumber){
            PhoneNumber phoneNumber=(PhoneNumber)obj;
            return this.phoneNumber==phoneNumber.phoneNumber&&this.numAddr==phoneNumber.numAddr;
        }
        return false;
    }
}
